The following 2 (Creator / Institution) might throw an exception. Can you convert this to a function and check?

something like (there might be typos):
val namespaces = List(Namespace.Main,Namespace.File,Namespace.Category)
val commonsSpecificNamespaceNames = List("Creator",Institution",...)
var commonsSpecificNamespaces : List[Namespace] = List()
for (ns <- commonsSpecificNAmespaces) {
  case (Namespace(Language.Commons, ns)) match {
    some(namespace) => commonsSpecificNamespaces +: namespace
    None => _
  }
  namespaces :: commonsSpecificNamespaces
}