improve object check