lua: don't cache type info objects which are null

Otherwise, null is always returned, even if known to the system later on !

Signed-off-by: Peter Soetens <peter@thesourceworks.com>