Implemented exceptions and added a filter for arrays.