Check for col not undefined to avoid error in forEach loop