The current implementation should be changed so - it is more flexible (introducing some kind of "is_type"-function) - it produces meaningful error-message when a tested string is not a valid type