handle to not defined value of array
added few more test cases