fix to handle both of null and undefined as non-positive value