Got type checking to work