Update query to use filter since get raise an exception when a column is None