Added check on array