Update comparisons to === and update undefined checks