Added support of messages without fields.

This will support messages which just have enums or nested messages or messages
that are completely empty.
Changed the try/catch to an if/end.

Changed the try/catch introduced to support messages without fields to an if/end
block as per tanmaykm's suggestion.
Added test messages for messages without fields
Merge pull request #16 from analyzere/support-messages-without-fields

Added support for messages without fields.