fixed bug if response is null
fixed bug if response is null
fixed bug when response is null. Added unit tests for project.