Fix return value

Change the list method as described below.
Return value is nil if list is nil.