guard against missing/invalid post data