uncommented the error check for unknown trajtype