Added default constructor

- Added default constructor
- Optimized the creation of empty arrays
- Added checks for null pointers