Revise JavaDoc & add more argument checks