check for non-negative keys