adding logic to prevent build errors when keys aren't present