added toLowerCase and toUpperCase checks. also added option to specify check functions on the fly