Flip to use is_object instead of !is_null
Add tests