Check also if obj is not None