Boolean conversion

Added platform specific conversion form database Boolean type to PHP bool type
It avoids unnessecary in_array() checks but adds new separate checks in the if statement and makes the code more complicated which reduces readability.