Checked the typeof for each parameter given. Added test cases to cover these functions.

min and max should be numbers. ar should be array. fnRandom should be a
function.