why not simplify this to?

````php
return $obj instanceof Post;
````