Added checking if entity can be casted