PHP Sprawdź, czy nieobkcja

is_object($yourObject)
  
@returns bool
Lazurite