fixed compatibility issue with PHP 5.3.3

is_a in PHP 5.3.3 does not support third parameter (allow_string) thus $object parameter cannot be string.