Fix NPE thrown by Optional

Need to call 'fromNullable' instead of 'of'
Merge pull request #306 from spotify/rculbertson/npe

Fix NPE thrown by Optional