added getType method that lets you get the type of any nested field
small bugfix
now can also use getType on entity instances