Validate Mathematical Expression In Javascript