That is perfectly valid! What you did in the second example is to use the short form if you don't specify any additional type facets like properties or others. If the
type facet is the only one you define, you can shorten the syntax from the first example to the second.
So in short, both are equivalent!