could use isPointData() function call directly in the if statement. (the variable is not used anywhere)