Remove native type conversion for +-INF and NaN
Also add type to boolean if the syntax check fails
Precompile the patterns for efficiency and maintainability