FIX: wrong type tests