Added prop guards to todo