Added proper argument check