null check in common.js submit