In this case, the input validation is potentially wasteful, especially the densification.