Sadly no. First, if paramType is a primitive, then pclass is always a boxed type. Second, if pclass is a string, it might be csvnull, which needs to be checked. The above code works for things like Timestamp type and VoltTable, but it's a less exciting optimization by then.