Optimize if/else logic in quantum.api.v2.base.prepare_request_body()

Removed redundant checkups of variables

Fixes bug #1096932

Change-Id: Icdee0e946a77865928b942d3248e39e771af0656
Merge "Optimize if/else logic in quantum.api.v2.base.prepare_request_body()"