See the issue is that when you are instancing and initialising your variable you are telling it that the value its gonna receive will be a value for the object named Dogs present in this snapshot whose type is AnyObject.

But snapshot.value is of type Dictionary i.e [String:AnyObject],NSDictionary..

And the Dogs node that you retrieve is of type, either Dictionary or an Array.

Basically you should avoid to store a value in a variable, of type AnyObject