Should probably be "db"
An array is always defined. Testing the size instead