Allowing for POST with optional parameter not populated.

- The AJAX request with data = new FormData posts invalid request data.
- Added check to set data to null if no parameters are present.