some more type checking