[power] Fixed error handling

As suggested by @mmocny, I've added a JS check for the level argument of `chrome.power.requestKeepAwake`