Fixed bug with boolean types, must check bool before int since bool is a subtype of int