Add type checks for List.push and List.unshift

These should probably be done at a lower level, but for now we're at least
according to spec.