On the nature of differences in the Ni charge states in barium and strontium titanates