I mean looking at the results from the GetList call. Is your custom page in the context of the list? i.e., stored at /Lists/Listname?
It looks like the call to GetList immediately above the code you show isn't returning the StaticName or it may be failing.
M.