Added in further nil view checking and also a shadow toggle property
Further nil checking