make sure values isn't undefined