Added explicit check for object