This is perfectly valid. It is not necessary to have the definition before the usage.
Note that sometimes you cannot avoid this situation for example if there are circular dependencies between types:
A ::= some definition involving B
B ::= some definition involving A