Instead of nulls, it'd be preferable to use Scala options.