fixed stylesheet null check