[snipmatch] Bug 455392: Potential NPEs in SnippetCodeBuilder

Change-Id: Ie3b4f23f373a163d62a34a55b25a8cbdb5af0977
Signed-off-by: Andreas Sewe <andreas.sewe@codetrails.com>