Checking if block is not nil before calling it.