Throw an error when a view is not registered, so it's clear why a view creation failed

Currently, if a view is not registered, then it just silently returns null and code fails later on.  This change makes the error more explicit and catchable.