Add check for non-UIAElement objects