Change NULL to None in python docs, and fix query