Return undefined if values is undefined or null