util: more strict check for bool/number/string
Merge remote-tracking branch 'upstream/master'