Revert "Fix authenticationMechanisms check in jstest helper"

This reverts commit b2f87f53245b8c15eff65700a929984ebeab75a8.
Fix authenticationMechanisms check in jstest helper by adding type check