Added check to prevent segfault when trying to read from registry that isn't there.