check if the object has a material