Fixing type checking of arguments passing and parsing of generic for locals