Preventing nil method error.