Executes the given block and returns its result if this Boolean is true, otherwise returns null.
The result of block if true, null otherwise
The function to execute if this Boolean is true
The return type of the block