1. Refactored the code in the function to utilize convert_mapping_to_xml's
way of detecting valid types.
2. Refactored optional parameters to use convert_mapping_to_xml
Note:
This update will affect users using lowercase inputs in their YAML files.
An exception will be raised if the inputs doesn't follow the exact
casing required by the plugin.
Change-Id: I053ef5f58200e51b3f6ff5ec55760f9e6f095370