testing typeof img['filename']