fix usage of check:getType()