Bugzilla#455545 Fixed NPE by checking null measure while creating query
definition.