check if object exist by id