handler: fix several panics thrown by RecordQueryHandler
handler: fix several panics thrown by RecordQueryHandler

SkygearIO/skygear-server,rickmak/skygear-server,rickmak/skygear-server,rickmak/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server