refactor value is None process and add test case