fix issue with null value + add integration test