Added null check to spyglass