move type conversion to commands module (#265)

This change also uses the existing str2bool utility function.
changelog/thanks for #265