prevent crashes when input is missing some fields. fix date filtering on query route. changes all date parameters to the format YYYY-MM-DD