promote nil check to method guard; raise TypeError