Created JS boolean function.