Added additional null check for this.options