So this will only write jmsType, jmsDeliveryMode and jmsPriority only if there actually are operation properties. However, this may not always be the case. So the logic should be updated to 1 if statement connected with "or" clauses.

2) Also trim() should be added to 0 length checks, and add possibly added before actually writing the value.