Added check for where key