Added check for nil for linker