Using chrome.runtime.lastError instead of throw