GTQuaternionQ[q]
gives True if q is a quaternion, and gives False otherwise.
First, load the package:
Needs["GroupTheory`"]
Then run the example:
q1 = {1, {0, 1, 0}}
GTQuaternionQ[q1]
q2 = 89
GTQuaternionQ[q2]
GTGetEulerAngles GTGetMatrix GTGetQuaternion GTGetSymbol GTEulerAnglesQ GTGroupQ GTSymbolQ GTQAbs GTQConjugate GTQInverse GTQPolar GTTransformation MatrixQ