Added a helper function in detectparameterfn.js