Fixes bug with checking argument type