Fix error in opening a trial w/o dataset type

Reviewer: Dan Jao (post-commit)

Issue: GCP-9738