A bit better handling for entity icons.

Using isof() method of the model to check for types. This works best in
case multiple types are set. It might be a good idea to rewrite the
whole thing in future.