fixed not null issue in mechdb grammar, refactored null check expressions in mechdb grammar