more type guards

firefox 24 <3 typeguards