Fixed is_bst(...)

Also fixed wrong parameter constness to heap and bst checks.