Moved null checks to SerializationUtils
Added test for caches