Fix NPE thrown by Optional

Need to call 'fromNullable' instead of 'of'