Don't segfault on trailing NULL