use schema definition to determine when to run case insensitive queries

also removes the casting, no longer needed in updated waterline
use actual boolean type