Added check for empty clipboard