Fixing null errors on bad post request