added null check to getter functions