fixed bug in top-level arrays; checked to make sure containing class isn't null before calling its getDeclaredField(...) method