but how come compiler didn't give me an error? it's weird...
You are allowed to use the names of functions for use with function pointers, so it's still correct syntax, but using it in the if statement doesn't make sense. My compiler gives a warning about the address of function name always evaluating to true.
A function name by itself, without the call operator ( the parenthesis ) is a pointer to the function. So checkSomething is a pointer to the function which will certainly be a non-zero address value for the pointer. An implicit conversion to boolean takes place and since non-zero values evaluate to true, the expression checkSomething evaluates to true. Adding the negate operator flips the value so !checkSomething now evaluates to false and the if statement body is skipped. It compiles because it is legal code. It just wasn't doing what you thought it was.