Fix potential nil pointer

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>