Small edit to prevent potential method calls on nil