Replaced exception based null message format handling with Optional