null check for getComputedStyle, fixes#1