We could probably have this as a method in `Types.scala`?