Fixed cast bug for NULL table entries.

Exception was being thrown when attempting to decode NULL fields (as `undefined`).

Added pattern to bypass decoder functions when field is `undefined`.