To return a valid ray cast result the object must not be NULL and KX_RayCast::RayTest must return true.