Added a hasownproperty check