Improved parsing of boolean types