added null check for promocode