adding null parameter check to name(), fixing the issue and being consistent with superclass behavior