This works just fine if obj is null.