Some checks for empty taxonomies. Fixes #892.