Work properly with undefined values