fix null pointer crashes regarding missing views/embeddings