Javascript error with undefined dogs